/*
 * XML Type:  PresentmentCounts
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.PresentmentCounts
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML PresentmentCounts(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class PresentmentCountsImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.PresentmentCounts
{
    
    public PresentmentCountsImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName BILLSTATUSCOUNTS$0 = 
        new javax.xml.namespace.QName("", "BILLSTATUSCOUNTS");
    private static final javax.xml.namespace.QName BILLPMTSTATUSCOUNTS$2 = 
        new javax.xml.namespace.QName("", "BILLPMTSTATUSCOUNTS");
    
    
    /**
     * Gets array of all "BILLSTATUSCOUNTS" elements
     */
    public net.ofx.types.x2003.x04.BillStatusCounts[] getBILLSTATUSCOUNTSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(BILLSTATUSCOUNTS$0, targetList);
            net.ofx.types.x2003.x04.BillStatusCounts[] result = new net.ofx.types.x2003.x04.BillStatusCounts[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "BILLSTATUSCOUNTS" element
     */
    public net.ofx.types.x2003.x04.BillStatusCounts getBILLSTATUSCOUNTSArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillStatusCounts target = null;
            target = (net.ofx.types.x2003.x04.BillStatusCounts)get_store().find_element_user(BILLSTATUSCOUNTS$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "BILLSTATUSCOUNTS" element
     */
    public int sizeOfBILLSTATUSCOUNTSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(BILLSTATUSCOUNTS$0);
        }
    }
    
    /**
     * Sets array of all "BILLSTATUSCOUNTS" element
     */
    public void setBILLSTATUSCOUNTSArray(net.ofx.types.x2003.x04.BillStatusCounts[] billstatuscountsArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(billstatuscountsArray, BILLSTATUSCOUNTS$0);
        }
    }
    
    /**
     * Sets ith "BILLSTATUSCOUNTS" element
     */
    public void setBILLSTATUSCOUNTSArray(int i, net.ofx.types.x2003.x04.BillStatusCounts billstatuscounts)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillStatusCounts target = null;
            target = (net.ofx.types.x2003.x04.BillStatusCounts)get_store().find_element_user(BILLSTATUSCOUNTS$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(billstatuscounts);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "BILLSTATUSCOUNTS" element
     */
    public net.ofx.types.x2003.x04.BillStatusCounts insertNewBILLSTATUSCOUNTS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillStatusCounts target = null;
            target = (net.ofx.types.x2003.x04.BillStatusCounts)get_store().insert_element_user(BILLSTATUSCOUNTS$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "BILLSTATUSCOUNTS" element
     */
    public net.ofx.types.x2003.x04.BillStatusCounts addNewBILLSTATUSCOUNTS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillStatusCounts target = null;
            target = (net.ofx.types.x2003.x04.BillStatusCounts)get_store().add_element_user(BILLSTATUSCOUNTS$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "BILLSTATUSCOUNTS" element
     */
    public void removeBILLSTATUSCOUNTS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(BILLSTATUSCOUNTS$0, i);
        }
    }
    
    /**
     * Gets array of all "BILLPMTSTATUSCOUNTS" elements
     */
    public net.ofx.types.x2003.x04.BillPaymentstatusCounts[] getBILLPMTSTATUSCOUNTSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(BILLPMTSTATUSCOUNTS$2, targetList);
            net.ofx.types.x2003.x04.BillPaymentstatusCounts[] result = new net.ofx.types.x2003.x04.BillPaymentstatusCounts[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "BILLPMTSTATUSCOUNTS" element
     */
    public net.ofx.types.x2003.x04.BillPaymentstatusCounts getBILLPMTSTATUSCOUNTSArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillPaymentstatusCounts target = null;
            target = (net.ofx.types.x2003.x04.BillPaymentstatusCounts)get_store().find_element_user(BILLPMTSTATUSCOUNTS$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "BILLPMTSTATUSCOUNTS" element
     */
    public int sizeOfBILLPMTSTATUSCOUNTSArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(BILLPMTSTATUSCOUNTS$2);
        }
    }
    
    /**
     * Sets array of all "BILLPMTSTATUSCOUNTS" element
     */
    public void setBILLPMTSTATUSCOUNTSArray(net.ofx.types.x2003.x04.BillPaymentstatusCounts[] billpmtstatuscountsArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(billpmtstatuscountsArray, BILLPMTSTATUSCOUNTS$2);
        }
    }
    
    /**
     * Sets ith "BILLPMTSTATUSCOUNTS" element
     */
    public void setBILLPMTSTATUSCOUNTSArray(int i, net.ofx.types.x2003.x04.BillPaymentstatusCounts billpmtstatuscounts)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillPaymentstatusCounts target = null;
            target = (net.ofx.types.x2003.x04.BillPaymentstatusCounts)get_store().find_element_user(BILLPMTSTATUSCOUNTS$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(billpmtstatuscounts);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "BILLPMTSTATUSCOUNTS" element
     */
    public net.ofx.types.x2003.x04.BillPaymentstatusCounts insertNewBILLPMTSTATUSCOUNTS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillPaymentstatusCounts target = null;
            target = (net.ofx.types.x2003.x04.BillPaymentstatusCounts)get_store().insert_element_user(BILLPMTSTATUSCOUNTS$2, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "BILLPMTSTATUSCOUNTS" element
     */
    public net.ofx.types.x2003.x04.BillPaymentstatusCounts addNewBILLPMTSTATUSCOUNTS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BillPaymentstatusCounts target = null;
            target = (net.ofx.types.x2003.x04.BillPaymentstatusCounts)get_store().add_element_user(BILLPMTSTATUSCOUNTS$2);
            return target;
        }
    }
    
    /**
     * Removes the ith "BILLPMTSTATUSCOUNTS" element
     */
    public void removeBILLPMTSTATUSCOUNTS(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(BILLPMTSTATUSCOUNTS$2, i);
        }
    }
}
